curl = """
curl 'https://kms.datagrand.com/api/v1/knowledge_item/knowledge_details?knowledge_id=74633&set_action=1' \
  -H 'authority: kms.datagrand.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: zh-CN,zh;q=0.9' \
  -H 'appauth: MTk5ODc1X3dpa2k=' \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MzQxNTM5MzMsIm5iZiI6MTczNDE1MzkzMywianRpIjoiYjM2MzVkMGItMTM3Ni00ZWVlLWE1NGMtNzVkNzdlMmNmN2ZkIiwiZXhwIjoxNzM0NzU4NzMzLCJpZGVudGl0eSI6WyJVc2VyXzE3MzE4OTY3OTAiLG51bGxdLCJmcmVzaCI6ZmFsc2UsInR5cGUiOiJhY2Nlc3MiLCJ1c2VyX2NsYWltcyI6eyJ1c2VyaWQiOjM3MzMsInVzZXJuYW1lIjoiVXNlcl8xNzMxODk2NzkwIiwibGV2ZWwiOiJcdTY2NmVcdTkwMWFcdTc1MjhcdTYyMzciLCJ1c2VyX25pY2tuYW1lIjoiXHU2NzY4XHU3Mzg5XHU3NDJhIiwidXNlcl9pY29uIjoiLi9hc3NldHMvaW1hZ2VzL2F2YXRhci5zdmciLCJ1c2VyX2NlbnRlcl9pZCI6bnVsbH19.2CPNt3zl8hLYBJb1iso0eYeOF1FdInBwSq-Q0gwXB60' \
  -H 'cookie: service_type=km; _file_auth_info=eyJBdXRob3JpemF0aW9uIjoiQmVhcmVyIGV5SjBlWEFpT2lKS1YxUWlMQ0poYkdjaU9pSklVekkxTmlKOS5leUpwWVhRaU9qRTNNelF4TlRNNU16TXNJbTVpWmlJNk1UY3pOREUxTXprek15d2lhblJwSWpvaVlqTTJNelZrTUdJdE1UTTNOaTAwWldWbExXRTFOR010TnpWa056ZGxNbU5tTjJaa0lpd2laWGh3SWpveE56TTBOelU0TnpNekxDSnBaR1Z1ZEdsMGVTSTZXeUpWYzJWeVh6RTNNekU0T1RZM09UQWlMRzUxYkd4ZExDSm1jbVZ6YUNJNlptRnNjMlVzSW5SNWNHVWlPaUpoWTJObGMzTWlMQ0oxYzJWeVgyTnNZV2x0Y3lJNmV5SjFjMlZ5YVdRaU9qTTNNek1zSW5WelpYSnVZVzFsSWpvaVZYTmxjbDh4TnpNeE9EazJOemt3SWl3aWJHVjJaV3dpT2lKY2RUWTJObVZjZFRrd01XRmNkVGMxTWpoY2RUWXlNemNpTENKMWMyVnlYMjVwWTJ0dVlXMWxJam9pWEhVMk56WTRYSFUzTXpnNVhIVTNOREpoSWl3aWRYTmxjbDlwWTI5dUlqb2lMaTloYzNObGRITXZhVzFoWjJWekwyRjJZWFJoY2k1emRtY2lMQ0oxYzJWeVgyTmxiblJsY2w5cFpDSTZiblZzYkgxOS4yQ1BOdDN6bDhoTFlCSmIxaXNvMGVZZU9GMUZkSW5Cd1NxLVEwZ3dYQjYwIiwiQXBwYXV0aCI6Ik1UazVPRGMxWDNkcGEyaz0iLCJYLUFwcC1JZCI6MTk5ODc1LCJYLVNlcnZpY2UtVHlwZSI6ImttIiwiWC1BcHAtTmFtZSI6Indpa2kifQ==' \
  -H 'kms-tag: kms' \
  -H 'referer: https://kms.datagrand.com/fronted/' \
  -H 'sec-ch-ua: "Not:A-Brand";v="99", "Chromium";v="112"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 QuarkPC/1.10.5.186' \
  -H 'x-app-id: 199875' \
  -H 'x-app-name: wiki' \
  -H 'x-service-type: km' \
  --compressed
"""

from requests import request
from simpleutil.web import parse_curl
m,u,h,d = parse_curl(curl)
response = request(method=m, url=u, headers=h, data=d)
print(response.text)
